package com.zb.vo;

import com.zb.entity.GoodsSpecInfoVo;
import com.zb.entity.KnowledgeTypeRelationVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/8/15 0015
 **/
@Data
@ApiModel(value = "商品对象")
public class GoodsVo {
    @ApiModelProperty(value = "商品ID，新增不必传，修改必传")
    private Long id;

    @ApiModelProperty(value = "品牌商家ID")
    private List<Long> factoryIds;

    @ApiModelProperty(value = "品牌ID")
    private Long brandId;

    @Length(max = 20, message = "品牌名称限制20个字符以内")
    @ApiModelProperty(value = "品牌名称")
    private String brand;

    @ApiModelProperty(value = "商品名称，不填则默认为商品型号")
    private String name;

    @NotBlank(message = "商品型号不能为空")
    @ApiModelProperty(value = "商品型号", required = true)
    private String model;

    @Length(max = 60, message = "商品编码限制60个字符以内")
    @ApiModelProperty(value = "商品编码，不填则系统生成")
    private String code;

    @Length(max = 60, message = "商品编码限制60个字符以内")
    @ApiModelProperty(value = "商品货号，不填则系统生成")
    private String itemNumber;

    @NotNull(message = "商品单位ID不能为空")
    @ApiModelProperty(value = "商品单位ID", required = true)
    private Long unitId;

    @NotBlank(message = "商品单位名称不能为空")
    @Length(max = 20, message = "商品单位名称限制20个字符以内")
    @ApiModelProperty(value = "商品单位", required = true)
    private String unit;

    @ApiModelProperty(value = "商品分类ID")
    private Long typeId;

    @Length(max = 20, message = "商品分类名称限制20个字符以内")
    @ApiModelProperty(value = "商品分类名称")
    private String type;

    @ApiModelProperty(value = "是否启用登记关联：false-否，true-是", example = "false")
    private Boolean enabledRegister;

    @NotNull(message = "商品状态不能为空")
    @ApiModelProperty(value = "商品状态: false-启用，true-禁用", required = true, example = "false")
    private Boolean status;

    @Length(max = 100, message = "备件供应商名称限制100个字符内")
    @ApiModelProperty(value = "备件供应商名称")
    private String supplier;

    @Length(max = 30, message = "备件供应商联系电话限制30个字符内")
    @ApiModelProperty(value = "备件供应商联系电话")
    private String supplierTelephone;

    @ApiModelProperty(value = "商品内容简介")
    private String content;

    @Valid
    @NotNull(message = "商品规格信息不能为空")
    @NotEmpty(message = "商品规格信息不能为空")
    @Size(min = 1, message = "至少填写一项规格信息")
    @ApiModelProperty(value = "商品规格信息", required = true)
    private List<GoodsSpecInfoVo> specVos;

    @ApiModelProperty(value = "删除的商品规格ID集合")
    private List<Long> delSepcIds;

    @ApiModelProperty(value = "商品图片集合")
    private List<GoodsImageVo> imageVos;

    @ApiModelProperty(value = "删除的商品图片ID集合")
    private List<Long> delImageIds;

    @Valid
    @ApiModelProperty(value = "商品参数")
    private GoodsParamValVo paramValVo;

    @Valid
    @ApiModelProperty(value = "商品自定义参数")
    private List<GoodsCustomParamVo> customParamVos;

    @ApiModelProperty(value = "删除的商品自定义参数ID")
    private List<Long> delCustomParamIds;

    @ApiModelProperty(value = "知识库分类关联对象")
    private List<KnowledgeTypeRelationVo> knowledgeTypeVos;

    @ApiModelProperty(value = "删除的知识库分类关联ID对象")
    private List<Long> delKnowledgeTypeIds;

    @Valid
    @ApiModelProperty(value = "扩展路径集合")
    private List<ProductExtendPathVo> extendPathVos;

    @ApiModelProperty(value = "删除的扩展路径ID集合")
    private List<Long> delextendPathIds;

}
